﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace iUserServiceClient
{
    public partial class Form1 : Form
    {
        vn.chuyentin.service.iUserService _service = new vn.chuyentin.service.iUserService();
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            bool isAuthorize = _service.Login("taipm","P@$$w0rd");
            if (isAuthorize)
            {
                MessageBox.Show("Đăng nhập thành công");
            }
            else
            {
                MessageBox.Show("Thất bại");
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            bool isRegistered = _service.Register("taipm", "P@$$w0rd", "taipm@bidc.vn");
            if(isRegistered)
            {
                MessageBox.Show("Đăng ký thành công");
            }
            else
            {
                MessageBox.Show("Thất bại");
            }
        }
    }
}
